<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/15
  Time: 14:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page import="pojo.Btcfrelation" %>
<%@ page import="dto.ShtbDetailDto" %>
<%@ page import="java.util.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>细节查询</title>
    <style type="text/css">
        table {
            border-collapse: collapse;
        }
    </style>
</head>
<script>
    function backToShtbList() {
        location="/TcmSystem/ShtbServlet?action=list&curPage=1";
    }
</script>
<body>
<%
    ShtbDetailDto shtbDetailDto = (ShtbDetailDto)request.getAttribute("detail");
    List<Btcfrelation> btcfrelationList=shtbDetailDto.getBtcfRelationList();
%>

<h1 align="center">条辩细节</h1>
<table border="2" width="500px" align="center">
    <tr>
        <td>编号</td>
        <td>内容</td>
        <td>注释</td>
    </tr>
    <tr>
        <td><%=shtbDetailDto.getNum() %> </td>
        <td><%=shtbDetailDto.getContent() %> </td>
        <td><%=shtbDetailDto.getComment()  %> </td>
    </tr>
    <tr>
        <td align="center" colspan="6">处方类型</td>
    </tr>
    <%
        for(Btcfrelation relation:btcfrelationList){	%>
    <tr align="center">

        <td colspan="6">
            <%if (relation.getCftype().equals("2")){%>
            <%="误用"%>
            <%}else if (relation.getCftype().equals("1")){%>
            <%="对症"%>
            <%}else if (relation.getCftype().equals("3")){%>
            <%="其他"%>
            <%}%>
        </td>

    </tr>
    <%} %>
</table>
<div align="center">
    <input align="center" type="button" value="返回" onclick="backToShtbList();"/>
</div>

</body>
</html>
